<template>
  <div class="bg-gray container">
    <xd-datalist url="/api/getMessages">
        <template slot-scope="scope">
            <div class="list-container bg-white">
                <div class="flex p30 border-b" v-for="item in scope.list" :key="item.id" @click="showDetail(item.id)">
                    <div class="flex-con fz28 text333">
                        {{item.title}}
                    </div>
                    <img src="../../assets/icons/gt.png" alt="" class="gt">
                </div>
            </div>
        </template>
    </xd-datalist>    
  </div>
</template>

<script>
  export default {
      methods:{
          showDetail(id){
            this.$router.push('/msgdetail?id='+id);
          }
      } 
  }

</script>
